package com.zmn.plat.admin.constant;

import com.zmn.common.dictionary.DictModel;

import java.util.ArrayList;
import java.util.List;

/**
 * @author tanbiao
 * @description CC数据部门常量
 * @since 2019/11/6 17:20
 * @modifier
 **/
public class CCConstants {
    /**
     * CC数据部门常量：品控部门
     */
    public final static int DEPARMENT_CONTROLLER = 2017;
    /**
     * CC数据部门常量：呼叫中心
     */
    public final static int DEPARMENT_CALLER = 2044;
    /**
     * CC数据部门常量：订单管理部
     */
    public final static int DEPARMENT_ORDER = 2043;
    /**
     * CC数据部门常量：客服部
     */
    public final static int DEPARMENT_SERVICE = 4342;
    /**
     * CC数据部门常量：网点管理部
     */
    public final static int DEPARMENT_NET_CONTROLLER = 4337;

    /**
     * CC数据部门常量集合
     */
    private static final List<DictModel> CC_DEPARTMENTS = new ArrayList<>();

    /**
     * CC数据部门常量
     *
     * @return
     */
    public static List<DictModel> getCcDepartments() {
        if (CC_DEPARTMENTS.size() == 0) {
            CC_DEPARTMENTS.add(new DictModel(DEPARMENT_CONTROLLER, "品控部门"));
            CC_DEPARTMENTS.add(new DictModel(DEPARMENT_CALLER, "呼叫中心"));
            CC_DEPARTMENTS.add(new DictModel(DEPARMENT_ORDER, "订单管理部"));
            CC_DEPARTMENTS.add(new DictModel(DEPARMENT_SERVICE, "客服部"));
            CC_DEPARTMENTS.add(new DictModel(DEPARMENT_NET_CONTROLLER, "网点管理部"));
        }
        return CC_DEPARTMENTS;
    }

    /**
     * CC数据部门常量
     *
     * @return
     */
    public static String getCcDepartmentsName(Integer deparentId) {
        String name = "";
        if(deparentId==null){
        }else if(deparentId.equals(2017)){
            name="品控部门";
        }else if(deparentId.equals(2044)){
            name="呼叫中心";
        }else if(deparentId.equals(2043)){
            name="订单管理部";
        }else if(deparentId.equals(4342)){
            name="客服部";
        }else if(deparentId.equals(4337)){
            name="网点管理部";
        }
        return name;
    }
}
